package com.jctrip.hotel.source.model.greentree.resp;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlElementWrapper;
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty;
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement;
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlText;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.math.BigDecimal;
import java.util.List;
/**
 * @Author：Haruhi
 * @description:
 * @Date：2023/8/31 14:11
 * @Package：com.jctrip.hotel.source.model.greentree.resp
 * @Project：hotel-main
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
@JacksonXmlRootElement(localName = "GetActivityRoomList")
public class GetActivityRoomListResp extends GreenTreeBaseResp {

    @JacksonXmlProperty(localName = "ReqHotels")
    private ReqHotels reqHotels;

    @Data
    @NoArgsConstructor
    @AllArgsConstructor
    @Builder
    public static class ReqHotels {
        @JacksonXmlProperty(localName = "ReqHotel")
        private ReqHotel reqHotel;

        @Data
        @NoArgsConstructor
        @AllArgsConstructor
        @Builder
        public static class ReqHotel {
            @JacksonXmlProperty(localName = "HotelCode")
            private String hotelCode;

            @JacksonXmlProperty(localName = "ReqTypes")
            private ReqTypes reqTypes;

            @Data
            @NoArgsConstructor
            @AllArgsConstructor
            @Builder
            public static class ReqTypes {
                @JacksonXmlElementWrapper(useWrapping = false)
                @JacksonXmlProperty(localName = "ReqType")
                private List<ReqType> reqTypeList;

                @Data
                @NoArgsConstructor
                @AllArgsConstructor
                @Builder
                public static class ReqType {
                    @JacksonXmlProperty(localName = "roomTypeCode", isAttribute = true)
                    private String roomTypeCode;

                    @JacksonXmlProperty(localName = "activityCode",isAttribute = true)
                    private String activityCode;

                    @JacksonXmlProperty(localName = "roomTypeName",isAttribute = true)
                    private String roomTypeName;

                    @JacksonXmlProperty(localName = "RoomRate")
                    private RoomRate roomRate;

                    @Data
                    @NoArgsConstructor
                    @AllArgsConstructor
                    @Builder
                    public static class RoomRate {
                        @JacksonXmlProperty(localName = "currencyCode",isAttribute = true)
                        private String currencyCode;

                        @JacksonXmlProperty(localName = "activityDate",isAttribute = true)
                        private String activityDate;

                        @JacksonXmlProperty(localName = "roomCount",isAttribute = true)
                        private Integer roomCount;

                        /**
                         * 暂无用处
                         */
                        @ApiModelProperty(value = "无用")
                        @JacksonXmlText
                        private BigDecimal price;
                    }
                }
            }
        }
    }
}
